// 默认主题色
$theme-color-primary: var(--primary, #007bff);
$theme-color-success: var(--success, #28a745);
$theme-color-info: var(--info, #b9b9b9);
$theme-color-warning: var(--warning, #eeb406);
$theme-color-danger: var(--danger, #dc3545);

// 默认颜色
$color-white: #ffffff;
$color-black: #000000;
$border-color-default: #dcdfe6;
$text-color-default: #606266;
$bg-color-default: #ffffff;
$bg-color-model: #00000056;
$bg-color-hover: #f5f7fa;
$opacity-disabled: 0.6;
$scrollbar-size: 6px;
$scrollbar-bg: rgba(#000000, 0.05);
$scrollbar-thumb-color: rgba(#000000, 0.3);
// 主题浅色

// 默认字体大小
$font-size-small: 12px;
$font-size-default: 14px;
$font-size-large: 16px;
$font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5fae\8f6f\96c5\9ed1", Arial,
  sans-serif;
// z-index 层
$z-index-show: 1;
$z-index-up: 2001;
$z-index-dow: -1;

// 边框颜色颜色
@function border-color($opacity) {
  @return rgba(220, 220, 220, $opacity);
}

// 公共样式
// - 禁用
.t-disabled {
  cursor: not-allowed !important;
  opacity: $opacity-disabled !important;
  user-select: none;
}
// 隐藏默认滚动条
.t-hide-scrollbar {
  overflow: auto;
  // 隐藏滚动条 全面兼容
  scrollbar-width: none;
  &::-webkit-scrollbar {
    width: 0px;
    height: 0px;
  }
}

// -loading
.t-loading {
  animation: anima-loading 2s linear infinite;
}
// scrollbar
.t-scrollbar-default {
  &::-webkit-scrollbar {
    width: 0px;
    height: 0px;
  }
}

// 全局元素样式
* {
  transform-origin: center;
  will-change: transform; // 解决transform抖动
  font-family: $font-family; // 全局字体
}

// input
input,
textarea {
  padding: 0;
  outline: none;
  border: none;
  background: none;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: $font-family;
  color: $text-color-default;
  font-size: inherit;
}
// 表单组件提示tip
.t-tip {
  position: absolute;
  color: rgba(128, 128, 128, 0.747);
  font-size: 10px;
  transition: 0.22s;
  left: 8px;
  top: -10px;
  z-index: $z-index-up;
  background-color: white;
  user-select: none;
  animation: anima-tip ease 0.11s;
}

input::placeholder,
textarea::placeholder {
  opacity: 0.5;
  font-size: 12px;
  font-family: $font-family;
}

// 去除加减符
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

@keyframes anima-loading {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

// 全局滚动条
/* 全局滚动条宽度 */
::-webkit-scrollbar {
  width: $scrollbar-size;
  height: $scrollbar-size;
}

/* 滚动条轨道 */
::-webkit-scrollbar-track {
  background: transparent;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  background-color: $scrollbar-thumb-color;
  border-radius: 10px;
  cursor: pointer;
}

// 去除默认样式
ul,
li {
  margin: 0;
  padding: 0;
  list-style-type: none;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: none;
}
// 去除默认样式
html,
body,
#app {
  margin: 0;
  padding: 0;
}
